package com.alibaba.mapper;


import com.alibaba.bean.Data;
import com.alibaba.bean.Notice;
import com.alibaba.bean.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface FollowNumMapper {
    @Select(value = "select count(followId) from follow where userId=#{userId}")
    int fansnum(int userId);
    @Select(value = "select count(followId) from follow where fansId=#{userId}")
    int follownum(int userId);
    @Select(value = "select * from user where userId=#{userId}")
    User getUser(int userId);
    @Select(value = "select content from notice")
    List<Notice> findcontent();
    @Select(value = "select content from notice where noticeId=2")
    Notice findcontent1();
    @Select(value = "select content from notice where noticeId=3")
    Notice findcontent2();
    @Select(value = "select content from notice where noticeId=4")
    Notice findcontent3();
}
